import java.io.*;
import java.util.Date;
public class Iotest {
    public static void main(String[] args) throws IOException {
        File log = new File("C:\\Users\\Administrator\\IdeaProjects\\untitled/log.txt");
        log.createNewFile();
        FileWriter fr = new FileWriter(log);
        BufferedWriter bw = new BufferedWriter(fr);
        BufferedReader bin = new BufferedReader(new InputStreamReader(System.in));
        String str = bin.readLine();
        while (!(str.equals("exit"))) {
            Date date = new Date();
            bw.write(str+ date);
            bw.newLine();
            str = bin.readLine();
        }
        bw.close();
        fr.close();
        bin.close();
    }
}
